package cn.ws.client;

import java.rmi.RemoteException;

import net.carefx.engine.core.ecm.components._Proxy63;
import net.carefx.pms.serivce.in.MasterDataService;
import net.carefx.pms.serivce.in.Personnel;

import org.apache.cxf.frontend.ClientProxyFactoryBean;
import org.apache.cxf.interceptor.LoggingInInterceptor;

public class MasterDataClient {
	
	public static void main(String[] args) throws RemoteException {
		ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
		factory.setServiceClass(MasterDataService.class);
		factory.setAddress("http://192.168.103.113:8022/masterDataService");
		factory.getInInterceptors().add(new LoggingInInterceptor());
		MasterDataService service = (MasterDataService)factory.create();
		Personnel personnel = new Personnel();
		personnel.setCode("EKGK001");
		personnel.setContactPerson("儿科骨科测试");
		personnel.setContactPhone("12321321");
		
		personnel.setOrganizationCode("11860");
		personnel.setProfessionalRanks("1");
		personnel.setPyCode("EKGK");
		
		service.saveOrUpdatePersonnel(personnel);
	
		
	}

}
